package cn.yu.takeoutbackend.common;

import lombok.Data;

@Data
public class PageSize {
    private int pageNum;
    private int total;
    private boolean hasNext;
    private boolean hasPrevious;
    private int currentPage;

    public PageSize setPageNum(int pageNum) {
        this.pageNum = pageNum;
        return this;
    }

    public PageSize setTotal(int total) {
        this.total = total;
        return this;
    }

    public PageSize setHasNext(boolean hasNext) {
        this.hasNext = hasNext;
        return this;
    }

    public PageSize setHasPrevious(boolean hasPrevious) {
        this.hasPrevious = hasPrevious;
        return this;
    }

    public PageSize setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
        return this;
    }
}